#ifndef _FRUSTUM_H_
#define _FRUSTUM_H_

#include <SEMath/Shape.h>

namespace SEngine
{
    class PerspectiveFrustum : public ShapeCRTP<PerspectiveFrustum>
    {
    public:
        PerspectiveFrustum(glm::vec3 pos, float fov, float aspect, float zNear, float zFar) 
            : m_pos(pos)
            , m_fov(fov) 
            , m_aspect(aspect) 
            , m_zNear(zNear) 
            , m_zFar(zFar) 
            {}
        virtual ~PerspectiveFrustum() = default;
        virtual void Transform(glm::mat4 matrix) override;
    private:
        glm::vec3 m_pos;
        float m_fov;
        float m_aspect;
        float m_zNear;
        float m_zFar;
    };

    class OrthoFrustum : public ShapeCRTP<OrthoFrustum>
    {
    public:
        OrthoFrustum(glm::vec3 pos, float size, float aspect, float zNear, float zFar) 
            : m_pos(pos)
            , m_size(size) 
            , m_aspect(aspect) 
            , m_zNear(zNear) 
            , m_zFar(zFar) 
            {}
        virtual ~OrthoFrustum() = default;
        virtual void Transform(glm::mat4 matrix) override;
    private:
        glm::vec3 m_pos;
        float m_size;
        float m_aspect;
        float m_zNear;
        float m_zFar;
    };
} // namespace SEngine


#endif